package com.gather.treesets;

import com.gather.orm.Animal;

import java.util.TreeSet;

public class Example06 {
    public static void main(String[] args) {
        System.out.println("测试排序问题");
        TreeSet<Animal> animals = new TreeSet<>();
        Animal animal1 = new Animal(20);
        Animal animal2 = new Animal(10);
        Animal animal3 = new Animal(15);
        animals.add(animal1);
        animals.add(animal2);
        animals.add(animal3);
        System.out.println(animals);
    }
}
